#include "module.h"
#include <stdio.h>

typedef int (*func)(void);

int main(int argc, char* argv)
{
	rt_system_module_init();

	// open the shared library
	void* handle = (void*)rt_module_open("./modules/1_hello/hello.so");

	func f1 = (func)NULL;

	// call .so 's func
	if(handle != NULL)
	{
		f1 = (func)dlsym(handle, NULL);

		if(f1 != NULL)
			f1();
		else 
			printf("call shared library failed.\n");
	}
	
    printf("exit normal\n");
    return 0;
}


